import http from "@/api";

const namespace = "/admin/product";
export const categoryList = (params?: object) => {
  return http.get(`${namespace}/category/index`, params, { noLoading: false });
};
export const categoryDetail = (params?: object) => {
  return http.get(`${namespace}/category/detail`, params, { noLoading: false });
};
export const categoryDel = (params?: object) => {
  return http.get(`${namespace}/category/delete`, params, { noLoading: false });
};
export const categoryStatus = (params?: object) => {
  return http.post(`${namespace}/category/status`, params, { noLoading: false });
};
export const categoryCreate = (params?: object) => {
  return http.post(`${namespace}/category/create`, params, { noLoading: false });
};
export const categoryUpdate = (params?: object) => {
  return http.post(`${namespace}/category/modify`, params, { noLoading: false });
};

export const depositoryList = (params?: object) => {
  return http.get(`${namespace}/depository/index`, params, { noLoading: false });
};
export const depositoryDetail = (params?: object) => {
  return http.get(`${namespace}/depository/detail`, params, { noLoading: false });
};
export const depositoryDel = (params?: object) => {
  return http.get(`${namespace}/depository/delete`, params, { noLoading: false });
};
export const depositoryStatus = (params?: object) => {
  return http.post(`${namespace}/depository/status`, params, { noLoading: false });
};
export const depositoryCreate = (params?: object) => {
  return http.post(`${namespace}/depository/create`, params, { noLoading: false });
};
export const depositoryUpdate = (params?: object) => {
  return http.post(`${namespace}/depository/modify`, params, { noLoading: false });
};

export const supplierList = (params?: object) => {
  return http.get(`${namespace}/supplier/index`, params, { noLoading: false });
};
export const supplierDetail = (params?: object) => {
  return http.get(`${namespace}/supplier/detail`, params, { noLoading: false });
};
export const supplierDel = (params?: object) => {
  return http.get(`${namespace}/supplier/delete`, params, { noLoading: false });
};
export const supplierStatus = (params?: object) => {
  return http.post(`${namespace}/supplier/status`, params, { noLoading: false });
};
export const supplierCreate = (params?: object) => {
  return http.post(`${namespace}/supplier/create`, params, { noLoading: false });
};
export const supplierUpdate = (params?: object) => {
  return http.post(`${namespace}/supplier/modify`, params, { noLoading: false });
};

export const productList = (params?: object) => {
  return http.get(`${namespace}/product/index`, params, { noLoading: false });
};
export const productDetail = (params?: object) => {
  return http.get(`${namespace}/product/detail`, params, { noLoading: false });
};
export const productDel = (params?: object) => {
  return http.get(`${namespace}/product/delete`, params, { noLoading: false });
};
export const productRecovery = (params?: object) => {
  return http.get(`${namespace}/product/recovery`, params, { noLoading: false });
};
export const productStatus = (params?: object) => {
  return http.post(`${namespace}/product/status`, params, { noLoading: false });
};
export const productCreate = (params?: object) => {
  return http.post(`${namespace}/product/create`, params, { noLoading: false });
};
export const productUpdate = (params?: object) => {
  return http.post(`${namespace}/product/modify`, params, { noLoading: false });
};

export const stockList = (params?: object) => {
  return http.get(`${namespace}/stock/index`, params, { noLoading: false });
};
export const stockDetail = (params?: object) => {
  return http.get(`${namespace}/stock/detail`, params, { noLoading: false });
};
export const stockDel = (params?: object) => {
  return http.get(`${namespace}/stock/delete`, params, { noLoading: false });
};
export const stockStatus = (params?: object) => {
  return http.post(`${namespace}/stock/status`, params, { noLoading: false });
};
export const stockCreate = (params?: object) => {
  return http.post(`${namespace}/stock/create`, params, { noLoading: false });
};
export const stockUpdate = (params?: object) => {
  return http.post(`${namespace}/stock/modify`, params, { noLoading: false });
};
